<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd"
        >
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>thymeleaf - Title </title>
</head>
<body>
<div>
    <h3>我的第一个Thymeleaf程序 !</h3>
    <p><span th:text="|欢迎您: ${name}|"><!--拼接字面量--></span></p>
    <p>date : <span th:text="2000+30">2000+30 </span></p>

    年龄:<span th:if="${user.id}lt 24">小鲜肉</span>
    <span th:unless="${user.id}lt 24">老腊肉</span>
    <span th:text="${user.name}?: '二狗'"></span>
</div>
<div>
    <table>
        <tr >
            <th>标题</th>
        </tr>
        <tr th:each="name,stat:${list}">
            <td th:text="${name}">123</td>
            <td th:text="${stat.index}"></td>
            <td th:text="${stat.count}"></td>
            <td th:text="${stat.odd}"></td>
            <td th:text="${stat.last}"></td>
            <td><a th:href="@{/user/detail(id=${stat.count})}">详情</a></td>
        </tr>
    </table>
</div>
<div>
    <!--取集合的第2个值-->
    list:<span th:text="${list[1]}"></span>
</div>
</body>
</html>